package com.wtwd.device.model.vo;

import com.alibaba.fastjson.JSON;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

@ApiModel(value = "天气数据")
public class WeatherVO {

    @ApiModelProperty(value = "城市")
    private String city;

    @ApiModelProperty(value = "城市CID")
    private String cid;

    @ApiModelProperty(value = "温度")
    private String tmp;

    @ApiModelProperty(value = "天气编码")
    private String condCode;

    @ApiModelProperty(value = "天气")
    private String condTxt;

    @ApiModelProperty(value = "最近几天")
    private List<WeatherDaily> dayList;

    @ApiModelProperty(value = "创建时间")
    private Long createTime;

    @ApiModelProperty(value = "更新时间")
    private Long updateTime;

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getTmp() {
        return tmp;
    }

    public void setTmp(String tmp) {
        this.tmp = tmp;
    }

    public String getCondCode() {
        return condCode;
    }

    public void setCondCode(String condCode) {
        this.condCode = condCode;
    }

    public String getCondTxt() {
        return condTxt;
    }

    public void setCondTxt(String condTxt) {
        this.condTxt = condTxt;
    }

    public List<WeatherDaily> getDayList() {
        return dayList;
    }

    public void setDayList(List<WeatherDaily> dayList) {
        this.dayList = dayList;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    @ApiModel(value = "当日天气")
    public static class WeatherDaily {

        @ApiModelProperty(value = "最高气温")
        private String max;
        @ApiModelProperty(value = "最低气温")
        private String min;
        @ApiModelProperty(value = "白天天气编码")
        private String dayCondCode;
        @ApiModelProperty(value = "夜间天气编码")
        private String nightCondCode;
        @ApiModelProperty(value = "白天天气")
        private String dayCondTxt;
        @ApiModelProperty(value = "夜间天气")
        private String nightCondTxt;
        @ApiModelProperty(value = "日期,2020-02-09")
        private String day;
        @ApiModelProperty(value = "气压")
        private String pressure;

        public String getMax() {
            return max;
        }

        public void setMax(String max) {
            this.max = max;
        }

        public String getMin() {
            return min;
        }

        public void setMin(String min) {
            this.min = min;
        }

        public String getDayCondCode() {
            return dayCondCode;
        }

        public void setDayCondCode(String dayCondCode) {
            this.dayCondCode = dayCondCode;
        }

        public String getNightCondCode() {
            return nightCondCode;
        }

        public void setNightCondCode(String nightCondCode) {
            this.nightCondCode = nightCondCode;
        }

        public String getDayCondTxt() {
            return dayCondTxt;
        }

        public void setDayCondTxt(String dayCondTxt) {
            this.dayCondTxt = dayCondTxt;
        }

        public String getNightCondTxt() {
            return nightCondTxt;
        }

        public void setNightCondTxt(String nightCondTxt) {
            this.nightCondTxt = nightCondTxt;
        }

        public String getDay() {
            return day;
        }

        public void setDay(String day) {
            this.day = day;
        }

        public String getPressure() {
            return pressure;
        }

        public void setPressure(String pressure) {
            this.pressure = pressure;
        }
    }

    public String toJson() {
        return JSON.toJSONString(this);
    }
}
